package com.sw.small_world.fragment.me.mycircle;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

import com.sw.small_world.R;
import com.sw.small_world.activity.ClickButtonActivity;
import com.sw.small_world.fragment.base.BaseFragment;
import com.sw.small_world.utils.ConstantUtils;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/3/16.
 */

public class CreateTagFragment extends BaseFragment {

    @Bind(R.id.tag_name)
    EditText tagName;
    private ClickButtonActivity activity;

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        activity = (ClickButtonActivity) getActivity();
        setActionBar();
    }

    @Override
    protected Object requestData() {
        return ConstantUtils.STATE_SUCCESSED;
    }

    @Override
    protected View getSuccessView() {
        View view = View.inflate(activity, R.layout.fragment_create_tag, null);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onClick(View v) {

    }
    private void setActionBar() {
        activity.tvTitle.setText("创建标签");
        activity.tvRight.setVisibility(View.VISIBLE);
        activity.tvRight.setText("完成");
        activity.tvRight.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                activity.finish();
            }
        });
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }
}
